import React,{useState} from 'react'
import { View,WebView } from '@tarojs/components'
import Taro,{ useDidShow } from '@tarojs/taro'

export default function ShopInline() {
  const [url, seturl] = useState('')
  useDidShow(()=>{
    setTimeout(() => {
      const {token} = Taro.getStorageSync('token')
      if(token){
        seturl(`https://0.ues.xyz/i/#/pages/mainPages/tabsPage/index?token=${token}&channel=${Taro.$channel}&time=${Date.now()}`)
      }else{
        seturl(`https://0.ues.xyz/i/#/pages/mainPages/tabsPage/index?channel=${Taro.$channel}`)
      }
    }, 0);
  })
  return (
    <View className='shop-inline'>
      <WebView src={url}></WebView>
    </View>
  )
}
